#ifndef _INC_APPOINTMENT_T_H_
#define _INC_APPOINTMENT_T_H_

#include <string>
#include "DayTime_t.h"

class Appointment_t
{
public:
	static const Appointment_t& invalid; // Invalid type

	/**
	* Ctor
	*/
	Appointment_t();

	/**
	* Dtor
	*/
	virtual ~Appointment_t();

	/**
	* Copy Ctor
	*/
	Appointment_t(const Appointment_t& other);

	/**
	* Operator=
	*/
	Appointment_t& operator=(const Appointment_t& other);

	/**
	* Operator==
	*/
	bool operator==(const Appointment_t& other) const;

	/**
	* Clones this appointment
	*/
	virtual Appointment_t* clone() const;

	/**
	* Returns true whether this appointment is valid, false otherwise
	*/
	bool isValid() const;

	/**
	* Returns start time
	*/
	inline const DayTime_t& startTime() const {
		return m_startTime;
	}

	/**
	* Returns end time
	*/
	inline const DayTime_t& endTime() const {
		return m_endTime;
	}

	/**
	* Sets time
	*/
	virtual bool setTime(const DayTime_t& startTime, const DayTime_t& endTime);

	/**
	* Sets subject
	*/
	inline void setSubject(const std::string& subject) {
		m_subject = subject;
	}

	/**
	* Returns subject
	*/
	inline const std::string& getSubject() const {
		return m_subject;
	}

private:
	DayTime_t m_startTime; // Appointment start time
	DayTime_t m_endTime; // Appointment end time
	std::string m_subject; // Appointment subject

	/**
	* Operator<<
	*/
	friend std::ostream& operator<<(std::ostream& os, const Appointment_t& app);
};

#endif // _INC_APPOINTMENT_T_H_